<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/
Route::post('user/login', 'UserController@login');
Route::post('user/reg', 'UserController@reg');
Route::post('friend/add', 'UserController@add_friend');
Route::post('message/send', 'MessageController@send');
Route::post('friends', 'UserController@get_friends');
Route::post('bind_client','MessageController@bind_client');
Route::post('user_id','UserController@get_user_name');

Route::any('test',function (){
    $message = new \App\Model\Messages();
    $rel = $message->where(['to'=>'UID5AB5AA7C1E20F','status'=>'1'])->get();
    foreach ($rel as $v) {
        $v->status = '0';
        var_dump($v->save());
    }
});